<!--用户操作弹窗-->
<ng-template #modalContent>
    <nz-spin [nzSpinning]="modalLoadingState">
        <form nz-form [formGroup]="dataForm" nzLayout="vertical">
            <div nz-row [nzGutter]="24">
                <div nz-col nzSpan="24">
                    <nz-form-item>
                        <nz-form-label nzRequired>公告标题</nz-form-label>
                        <nz-form-control [nzErrorTip]="errorNameTpl">
                            <input nz-input [(ngModel)]="entity.noticeTitle" formControlName="noticeTitle"  />
                            <ng-template #errorNameTpl let-control>
                                <ng-container *ngIf="control.hasError('required')">不能为空</ng-container>
                            </ng-template>
                        </nz-form-control>
                    </nz-form-item>
                </div>

                <div nz-col nzSpan="24">
                    <nz-form-item>
                        <nz-form-label nzRequired>公告类型</nz-form-label>
                        <nz-form-control [nzErrorTip]="errorNameTpl">
                            <app-dict-select [dictKey]="'sys_notice_type'" [(selectKey)]='entity.noticeType'></app-dict-select>
                            <input hidden nz-input [(ngModel)]="entity.noticeType" formControlName="noticeType" />
                            <ng-template #errorNameTpl let-control>
                                <ng-container *ngIf="control.hasError('required')">不能为空</ng-container>
                            </ng-template>
                        </nz-form-control>
                    </nz-form-item>
                </div>

                <div nz-col nzSpan="24">
                    <nz-form-item>
                        <nz-form-label>状态</nz-form-label>
                        <nz-form-control>
                            <nz-radio-group [(ngModel)]="entity.status"  nzButtonStyle="solid" formControlName='status'>
                                <label nz-radio-button  nzValue="0">正常</label>
                                <label nz-radio-button  nzValue="1">停用</label>
                            </nz-radio-group>
                        </nz-form-control>
                    </nz-form-item>
                </div>

                <div nz-col nzSpan="24">
                    <nz-form-item>
                        <nz-form-label>内容</nz-form-label>
                        <app-my-editor [maxHeight]='"400px"' [showToolbar]='true' [(htmlContent)]="entity.noticeContent" ></app-my-editor>
                    </nz-form-item>
                </div>
            </div>
        </form>
    </nz-spin>
</ng-template>
<ng-template #modalFooter>
    <button nz-button nzType="primary" [disabled]="dataForm.invalid" [nzLoading]="saveLoadingState" (click)="onSaveUser()">
        保存
    </button>
</ng-template>

